<!--
*Author：
 *Contact：
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/EQU_TOOL.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/EQU_TOOL.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '刀具',
                name: 'workbusiness/EQU_TOOL',
                url: "/EQU_TOOL/",
                sortName: "Identifier desc"
            });
            const editFormFields = ref({"Identifier":"","program_seq":"","tool_name":"","knife_length":"","SHELVES_Id":"","reality_pairing_length":"","knife_width":"","reality_knife_width":"","category":"","tool_type":"","handle_type":"","reality_R":"","reality_knife_length":"","reality_extensions_length":"","use_status":"","RfidCode":"","HolderTypeId":"","R":"","accuracy":"","MeasureTemplate":"","Holder_Code":"","Accessorie1Code":"","Ace1D":"","Ace1L":"","SecornSeq":"","Accessorie2Code":"","Ace2D":"","Ace2L":"","location":"","Img":"","Accessorie3_Code":"","Ace3D":"","Ace3L":"","MinToolLoad":"","MaxToolLoad":"","ToolSpeed":""});
            const editFormOptions = ref([[{"dataKey":"工单（没有Id）","data":[],"title":"工单","field":"Identifier","type":"select"},
                               {"title":"程序单序号","field":"program_seq","disabled":true,"type":"decimal"},
                               {"title":"刀具名称","field":"tool_name","type":"text"},
                               {"title":"刀长","field":"knife_length","type":"decimal"},
                               {"dataKey":"货架点位","data":[],"title":"货架点","field":"SHELVES_Id","type":"select"}],
                              [{"title":"实际对刀长度","field":"reality_pairing_length","type":"decimal"},
                               {"title":"刀径","field":"knife_width","type":"decimal"},
                               {"title":"实际刀径","field":"reality_knife_width","disabled":true,"type":"decimal"},
                               {"title":"类型","field":"category","type":"text"},
                               {"dataKey":"刀具类型","data":[],"title":"刀具类型","field":"tool_type","type":"select"}],
                              [{"title":"实际刀长","field":"reality_knife_length","disabled":true,"type":"decimal"},
                               {"dataKey":"刀柄类型2(没有Id)","data":[],"title":"刀柄类型2","field":"handle_type","type":"select"},
                               {"title":"实际刀尖圆角","field":"reality_R","disabled":true,"type":"decimal"},
                               {"title":"实际加长杆长度","field":"reality_extensions_length","type":"decimal"},
                               {"dataKey":"刀具状态","data":[],"title":"使用状态 ","field":"use_status","type":"select"}],
                              [{"title":"RfidCode","field":"RfidCode","disabled":true,"type":"text"},
                               {"dataKey":"刀柄类型","data":[],"title":"刀柄类型","field":"HolderTypeId","type":"select"},
                               {"title":"精度","field":"accuracy","type":"decimal"},
                               {"title":"刀具测量模板","field":"MeasureTemplate","disabled":true,"type":"text"},
                               {"title":"刀尖圆角","field":"R","type":"decimal"}],
                              [{"title":"刀柄编码","field":"Holder_Code","disabled":true,"type":"text"},
                               {"dataKey":"加长杆1","data":[],"title":"加长杆类型1","field":"Accessorie1Code","type":"select"},
                               {"title":"实际加长杆直径1","field":"Ace1D","type":"decimal"},
                               {"title":"实际加长杆长1","field":"Ace1L","type":"decimal"}],
                              [{"title":"第二序号","field":"SecornSeq","type":"decimal"},
                               {"dataKey":"加长杆2","data":[],"title":"加长杆类型2","field":"Accessorie2Code","type":"select"},
                               {"title":"实际加长杆直径2","field":"Ace2D","type":"decimal"},
                               {"title":"实际加长杆长2","field":"Ace2L","type":"decimal"}],
                              [{"title":"中央刀库位置","field":"location","disabled":true,"type":"number"},
                               {"title":"图","field":"Img","type":"img"},
                               {"dataKey":"加长杆3","data":[],"title":"加长杆类型3","field":"Accessorie3_Code","type":"select"},
                               {"title":"实际加长杆直径3","field":"Ace3D","type":"decimal"},
                               {"title":"实际加长杆长3","field":"Ace3L","type":"decimal"}],
                              [{"title":"最小负载","field":"MinToolLoad","type":"decimal"},
                               {"title":"最大负载","field":"MaxToolLoad","type":"decimal"},
                               {"title":"速度","field":"ToolSpeed","type":"decimal"}]]);
            const searchFormFields = ref({"Identifier":"","program_seq":"","HolderTypeId":"","tool_name":"","Holder_Code":""});
            const searchFormOptions = ref([[{"dataKey":"工单（没有Id）","data":[],"title":"工单","field":"Identifier","type":"select"},{"title":"程序单序号","field":"program_seq","type":"text"},{"dataKey":"刀柄类型","data":[],"title":"刀柄类型","field":"HolderTypeId","type":"select"},{"title":"刀具名称","field":"tool_name","type":"like"},{"title":"刀柄编码","field":"Holder_Code","type":"text"}]]);
            const columns = ref([{field:'Identifier',title:'工单',type:'string',bind:{ key:'工单（没有Id）',data:[]},width:210,align:'left',sort:true},
                       {field:'Id',title:'id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'RfidCode',title:'RfidCode',type:'string',width:80,readonly:true,align:'left'},
                       {field:'program_seq',title:'程序单序号',type:'int',sort:true,width:110,readonly:true,align:'left'},
                       {field:'SecornSeq',title:'第二序号',type:'int',width:80,align:'left'},
                       {field:'TogetherSeq',title:'组装序号',type:'int',width:80,align:'left'},
                       {field:'ExecuteTaskDiffTime',title:'执行时间',type:'int',width:80,align:'left'},
                       {field:'HolderTypeId',title:'刀柄类型',type:'string',bind:{ key:'刀柄类型',data:[]},width:120,align:'left'},
                       {field:'tool_name',title:'刀具名称',type:'string',link:true,width:120,align:'left'},
                       {field:'handle_type',title:'刀柄类型2',type:'string',bind:{ key:'刀柄类型2(没有Id)',data:[]},width:140,align:'left'},
                       {field:'reality_R',title:'实际刀尖圆角',type:'decimal',width:110,readonly:true,align:'left'},
                       {field:'R',title:'刀尖圆角',type:'decimal',width:110,align:'left'},
                       {field:'reality_pairing_length',title:'实际对刀长度',type:'decimal',width:110,align:'left'},
                       {field:'knife_length',title:'刀长',type:'decimal',width:110,align:'left'},
                       {field:'location',title:'中央刀库位置',type:'int',width:110,readonly:true,align:'left'},
                       {field:'reality_knife_length',title:'实际刀长',type:'decimal',width:110,hidden:true,readonly:true,align:'left'},
                       {field:'blade_length',title:'刃长',type:'decimal',width:110,align:'left'},
                       {field:'reality_blade_length',title:'实际刃长',type:'decimal',width:110,hidden:true,readonly:true,align:'left'},
                       {field:'collet_length',title:'夹头长度',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'work_order_id',title:'工单id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'extensions_length',title:'加长杆长度',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'SHELVES_Id',title:'货架点',type:'string',bind:{ key:'货架点位',data:[]},width:200,hidden:true,align:'left'},
                       {field:'Img',title:'图',type:'string',width:220,align:'left'},
                       {field:'pairing_length',title:'对刀长度',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'knife_width',title:'刀径',type:'decimal',width:110,align:'left'},
                       {field:'reality_knife_width',title:'实际刀径',type:'decimal',width:110,readonly:true,align:'left'},
                       {field:'accuracy',title:'精度',type:'decimal',width:110,align:'left'},
                       {field:'category',title:'类型',type:'string',width:100,align:'left'},
                       {field:'extensions_type',title:'加长杆类型',type:'string',width:220,hidden:true,align:'left'},
                       {field:'collet_type',title:'夹头类型',type:'string',width:220,hidden:true,align:'left'},
                       {field:'tool_type',title:'刀具类型',type:'string',bind:{ key:'刀具类型',data:[]},width:100,align:'left'},
                       {field:'MeasureTemplate',title:'刀具测量模板',type:'string',width:120,readonly:true,align:'left'},
                       {field:'reality_extensions_length',title:'实际加长杆长度',type:'decimal',width:130,align:'left'},
                       {field:'vendor_code',title:'厂商代码',type:'string',width:100,align:'left'},
                       {field:'tool_materials',title:'刀具材料',type:'string',width:100,align:'left'},
                       {field:'process_start_time',title:'加工开始时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'process_end_time',title:'加工完成时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'process_before_tool_width',title:'加工前刀径',type:'decimal',width:110,align:'left'},
                       {field:'process_after_tool_width',title:'加工后刀径',type:'decimal',width:110,align:'left'},
                       {field:'process_before_tool_length',title:'加工前刀长',type:'decimal',width:110,align:'left'},
                       {field:'process_after_tool_length',title:'加工后刀长',type:'decimal',width:110,align:'left'},
                       {field:'use_status',title:'使用状态 ',type:'int',bind:{ key:'刀具状态',data:[]},width:110,align:'left'},
                       {field:'work_order_status',title:'订单状态',type:'int',width:110,hidden:true,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,hidden:true,align:'left'},
                       {field:'Holder_Code',title:'刀柄编码',type:'string',width:120,hidden:true,readonly:true,align:'left'},
                       {field:'HolderBD',title:'刀柄大直径',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'HolderSD',title:'刀柄I小直径',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'HolderL',title:'刀柄长',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Accessorie1Code',title:'加长杆类型1',type:'string',bind:{ key:'加长杆1',data:[]},width:120,align:'left'},
                       {field:'Ace1C',title:'实际加长杆小直径',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Ace1D',title:'实际加长杆直径1',type:'decimal',width:130,align:'left'},
                       {field:'Ace1L1',title:'实际加长杆小长',type:'decimal',width:130,hidden:true,align:'left'},
                       {field:'Ace1L',title:'实际加长杆长1',type:'decimal',width:110,align:'left'},
                       {field:'Accessorie2Code',title:'加长杆类型2',type:'string',bind:{ key:'加长杆2',data:[]},width:120,align:'left'},
                       {field:'Ace2C',title:'实际小直径',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Ace2D',title:'实际加长杆直径2',type:'decimal',width:110,align:'left'},
                       {field:'Ace2L1',title:'实际小长',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Ace2L',title:'实际加长杆长2',type:'decimal',width:110,align:'left'},
                       {field:'Accessorie3_Code',title:'加长杆类型3',type:'string',bind:{ key:'加长杆3',data:[]},width:120,align:'left'},
                       {field:'Ace3C',title:'实际实际小直径',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Ace3D',title:'实际加长杆直径3',type:'decimal',width:110,align:'left'},
                       {field:'Ace3L1',title:'实际小长',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Ace3L',title:'实际加长杆长3',type:'decimal',width:110,align:'left'},
                       {field:'time',title:'理论时间',type:'string',width:120,align:'left'},
                       {field:'Ace1DTheory',title:'大直径理论',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Ace1LTheory',title:'大长理论',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Ace2DTheory',title:'大直径理论',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Ace2LTheory',title:'大长理论',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Ace3DTheory',title:'大直径理论',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Ace3LTheory',title:'大长理论',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'JacketLength',title:'夹套长',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'RotationalSpeed',title:'转速',type:'decimal',width:110,align:'left'},
                       {field:'Feed',title:'进给',type:'decimal',width:110,align:'left'},
                       {field:'CoolingMethod',title:'冷却方式',type:'string',bind:{ key:'冷却方式',data:[]},width:120,align:'left'},
                       {field:'Hardness',title:'刀具硬度',type:'decimal',width:110,align:'left'},
                       {field:'HolderBDTheory',title:'刀柄理论半径(大)',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'HolderSDTheory',title:'刀柄理论半径(小)',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'CTheory',title:'理论c角',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'CReality',title:'实际C角',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'HolderLTheory',title:'刀柄理论长',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'AccuracyAfterUse',title:'使用后精度（刀损值)',type:'decimal',width:110,align:'left'},
                       {field:'IsTogether',title:'是否组装',type:'string',width:110,align:'left'},
                       {field:'IsMeasure',title:'是否测量',type:'string',width:110,align:'left'},
                       {field:'IsTotallengthRange',title:'对刀长度总',type:'string',width:110,align:'left'},
                       {field:'IsKnifeLengthRange',title:'刀长',type:'string',width:110,align:'left'},
                       {field:'IsKnifeDRange',title:'刀头直径',type:'string',width:110,align:'left'},
                       {field:'IsHolderLenghtRange',title:'刀柄长是否在范围',type:'string',width:110,align:'left'},
                       {field:'IsHolderRRange',title:'刀柄半径是否在范围',type:'string',width:110,align:'left'},
                       {field:'IsAce1LenghtRange',title:'是否在范围加长杆长',type:'string',width:110,align:'left'},
                       {field:'IsAce1DRange',title:'是否在范围加长杆直径',type:'string',width:110,align:'left'},
                       {field:'IsAce2LenghtRange',title:'是否在范围加长杆长',type:'string',width:110,align:'left'},
                       {field:'IsAce2DRange',title:'是否在范围加长杆直径',type:'string',width:110,align:'left'},
                       {field:'IsAce3LenghtRange',title:'是否在范围加长杆长',type:'string',width:110,align:'left'},
                       {field:'IsAce3DRange',title:'是否在范围加长杆直径',type:'string',width:110,align:'left'},
                       {field:'IsUse',title:'是否使用',type:'string',width:110,align:'left'},
                       {field:'IsChange',title:'是否上换刀',type:'string',width:110,align:'left'},
                       {field:'FileSize',title:'文件大小',type:'string',width:120,align:'left'},
                       {field:'MeasureStartTime',title:'测量开始时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'MeasureEndTime',title:'测量结束时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'MinToolLoad',title:'最小负载',type:'decimal',width:110,align:'left'},
                       {field:'MaxToolLoad',title:'最大负载',type:'decimal',width:110,align:'left'},
                       {field:'ToolSpeed',title:'速度',type:'decimal',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
